package com.itheima.web.listener;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.annotation.WebFilter;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * @author ：sean
 * @date ：Created in 2022/4/27
 * @description ：
 * @version: 1.0
 */
// 监视会话
@WebListener
@Slf4j
public class HmSessionContextListener implements HttpSessionListener {
	@Override
	public void sessionCreated(HttpSessionEvent se) {
		log.info("[会话监听:创建:{}]",se.getSession().getId());

	}

	@Override
	public void sessionDestroyed(HttpSessionEvent se) {
		log.info("[会话监听:销毁:{}]",se.getSession().getId());
	}
}
